package com.svs.project.service;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.svs.project.mapper.CounterDao;
import com.svs.project.domain.Counter;
import com.svs.framework.base.service.CrudService;

/**
 * 生产线计数详情 服务层实现
 * 
 * @author 杜建桥
 * @date 2025-06-20
 */
@Service
public class CounterService extends CrudService<CounterDao, Counter> {
    @Autowired
    private CounterDao counterDao;

    /**
     * 根据生产线编号查询上个累计数量
     * @param code
     * @return
     */
    public Integer selectByCode(String code) {
        Integer num = counterDao.selectByCode(code);
        return num == null ? 0 : num;
    }
}
